-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Show options with Collapsible #7716
Conversation
Thanks for taking the time to open a PR!
|
18b4685
to
92f9c56
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran the tests in https://github.com/cypress-io/cypress-demo-ui/blob/master/cypress/integration/ui-states.js#L240 (Basically the same tests that are in the log_options_spec.js
file)
Visual changes
I like the options being more clearly defined, in this case with the use of an arrow icon.
Before
After
Performance changes
This seems to be slowing down the rendering/painting of the commands when there are options passed, so that a test will run longer after this change.
I'm not sure if there's something we could handle better here.
Before
After
|
Flaky failure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me assuming performance issues pointed out by Jennifer are fixed / improved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sainthkh The visual changes look good and we're ok to move forward with them. Have a couple questions left.
- Has there been any changes made to address the performance concerns?
- How does this perform during
cypress run
. Since this isn't interact-able, so couldn't be expanded - is there any difference in the behavior? There probably should be some thought for this.
|
I agree we might be best off doing this without |
This comment has been minimized.
This comment has been minimized.
@chrisbreiding The expand is mostly helpful for things that could have larger options (basically @sainthkh I think I would prefer it kept looking like an object, to more closely reflect the API. Maybe an inline object if one option:
And expanded object if more than one option? Or maybe react-inspector could be used only when more than one option? So you can expand only then.
|
Sorry I wasn't clear. I was referring to options objects that have further objects or arrays nested inside of them. I agree that the root options object should be collapsed/expanded, but I don't see much benefit in collapsing nested objects. For example, if you did
Like this after you've expanded it:
And then this after you clicked the blackout arrow:
But I think it's fine to jump straight to the fully expanded version. This obviates the need for |
I fixed the design. Single lineI think B looks better than A. Or are there any other suggestions? CollapsibleShow collapsible when an object has 2+ properties or the type of its only property is not an object/array. Future PlanIf the feature and design are right, I'll:
|
Definitely want to go with B. My suggestion for using |
Simple test for displayProps.
75a752d
to
fa8f819
Compare
Rebased and resolved conflicts. |
Part of why this was postponed for review is we were waiting to write some performance tests for the reporter - which has been done and exist here: https://github.com/cypress-io/cypress/blob/issue-6783/packages/driver/cypress/integration/e2e/performance_spec.ts So, assuming that these tests test what we want and that these changes don't impact the performance - we should be able to pick this back up when we have some time. |
I fixed this because it's left unresolved for a long time. The #8805 is WIP and the code will change as the things go on. I'll come back when it's done. |
That's very sad to hear. I tried the pre-release builds and I too did not experience any performance improvement in CI. Are you actively working on performance improvement at the moment? I see several issues regarding this has been closed recently, ref. #2579 and #4638. I'm currently working on a test suite consisting of 80 specs, each which takes ~6 seconds to load. This in itself adds 8 minutes in accumulated execution time. Furthermore, every test logs around 100-200 commands, which seems to further suppress performance. At least it decimates observed / experienced performance in interactive mode. I'm worried that Cypress doesn't take performance into account in the way I hoped and that it has become a tool which I will no longer consider. |
@badeball Unfortunately we're not looking into the performance issues atm. |
Closing because things have changed a lot. |
User facing changelog
Show command options with react-inspector.
Additional details
Why was this change necessary?
Sometimes, user-defined command options are unclear like
Object{N}
or even ignored on reporter.What is affected by this change?
It shows the values of options on reporter.
Any implementation details to explain?
N/A
How has the user experience changed?
Before:
After:
PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?